﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StyleMVVM.Notification.Tile
{
	internal class BaseWideTileUpdate : BaseTileUpdate, IWideTileUpdate
	{
		internal BaseWideTileUpdate(string tileName, int imageCount, int textCount) : base(tileName, imageCount, textCount)
		{
		}

		public override string GenerateXML()
		{
			string returnValue = null;

			if (RectangleUpdate != null)
			{
				returnValue = RectangleUpdate.GenerateXML();
			}
			else if (RectangleUpdateRequired)
			{
				throw new Exception("RectangleUpdate is required");
			}

			returnValue += base.GenerateXML();

			return returnValue;
		}

		public IRectangleTileUpdate RectangleUpdate { get; set; }

		public bool RectangleUpdateRequired { get; set; }
	}
}